package com.example.medicine.View;


import com.example.medicine.Bean.zhengzhuang;
import com.example.medicine.Mapper.xyjbMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class xyjbView {
    @Autowired
    private xyjbMapper xyjbMapper;
    @RequestMapping("/xyjb/create")
    public String xyjbCreateShow(){
        return "pages/xyjb/create";
    }
    /**
     * xyjb编辑展示页面
     */
    @GetMapping("/xyjb/edit/{id}")
    public String getTeamById(@PathVariable int id, Model model){
        zhengzhuang zhengzhuang=xyjbMapper.getById(id);
        zhengzhuang.setId(id);
        model.addAttribute("zhengzhuang", zhengzhuang);
        return "pages/xyjb/edit";
    }
}
